/// 忘记密码请求模型
class ForgotPasswordRequest {
  /// 电子邮箱
  final String email;
  
  /// 构造函数
  ForgotPasswordRequest({
    required this.email,
  });
  
  /// 转换为JSON
  Map<String, dynamic> toJson() {
    return {
      'email': email,
    };
  }
  
  /// 验证请求数据
  bool isValid() {
    // 验证邮箱格式
    final emailRegExp = RegExp(r'^[a-zA-Z0-9.]+@[a-zA-Z0-9]+\.[a-zA-Z]+');
    if (!emailRegExp.hasMatch(email)) {
      return false;
    }
    
    return true;
  }
} 